package com.learn.shop.constant;

public enum DictEnum {

    novel_isEnd("novel_isEnd", "是否完结"),
    novel_type("novel_type", "小说类型");

    private String type;
    private String typeDesc;


    DictEnum(String type, String typeDesc) {
        this.type = type;
        this.typeDesc = typeDesc;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeDesc() {
        return typeDesc;
    }

    public void setTypeDesc(String typeDesc) {
        this.typeDesc = typeDesc;
    }

    public static String getDictTypeDesc(String type) {
        String res;
        for (DictEnum value : DictEnum.values()) {
            if (value.type.equals(type)) {
                res = value.getTypeDesc();
                return res;
            }
        }
        return null;
    }
}
